package cn.hk.archives.service.impl;

import cn.hk.archives.domain.ArchivesOld;
import cn.hk.archives.domain.vo.ArchivesVo;
import cn.hk.archives.mapper.ArchivesOldMapper;
import cn.hk.archives.service.ArchivesOldService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 老年人及慢性病建档 服务实现类
 * </p>
 *
 * @author xu
 * @since 2023-05-17
 */
@Service
public class ArchivesOldServiceImpl extends ServiceImpl<ArchivesOldMapper, ArchivesOld> implements ArchivesOldService {
    @Autowired
    private ArchivesOldMapper archiveOldMapper;
    @Override
    public ArchivesVo getUserArchivesOldByUserId(Long userId) {
        return archiveOldMapper.selectUserArchivesOldByUserId(userId);
    }

    @Override
    public Boolean addArchivesOld(ArchivesVo archivesVo) {
        return archiveOldMapper.insertArchivesOld(archivesVo);
    }

    @Override
    public Boolean editArchivesOld(ArchivesVo archivesVo) {
        return archiveOldMapper.updateArchivesOld(archivesVo);
    }
}
